package com.xu.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
public class ProviderController {
    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)
    public String echo(@PathVariable String string) {

        return "Hello Nacos Discovery " + string;
    }
//    @GetMapping("/sendToRocketMQ")
//    public String sendToRocketMQ() {
//        String url = "http://cloud-rocketmq/sendMessage";
//        return restTemplate.getForObject(url, String.class);
//    }

}